<template>
	<div>
		<div class="box">
			BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
			<FormItems v-model="obj1" :config="formList" ref="form1">
				<template #a>1</template>
				<template #b>2</template>
				<template #c>3</template>
			</FormItems>
			<C ref="C"></C>
		</div>
	</div>
</template>
<script>
	import FormItems from '@/components/A/A-form/form/index.vue';
	import C from './c.vue';
	export default {
		components: { FormItems, C },
		props: {},
		data() {
			return {
				obj1: {},
			};
		},
		provide() {
			return {};
		},
		computed: {
			formList() {
				return [
					{
						label: 'A',
						type: 'input_number',
						prop: 'a',
						prototype: {
							step: 1,
							stepStrictly: true,
						},
						rules: true,
					},
					{
						label: 'B',
						type: 'input_number',
						prop: 'b',

						rules: true,
					},
					{
						label: 'c',
						type: 'input_number',
						prop: 'c',
						value: ({ row }) => {
							return row.a + row.b;
						},
						rules: true,
					},

					{
						label: 'upload',
						type: 'upload',
						prop: 'upload',
						rules: true,
					},
					{
						label: '姓名',
						prop: 'name',
						type: 'input',
						placeholder: '请输入姓名',
						rules: true,
						on: {
							// change: {
							//     handler: (row, index) => {
							//         console.log(row);
							//     },
							//     keepRaw: true,
							// },
							change: () => {
								console.log('change');
							},
						},
					},
				];
			},
		},
		beforeDestroy() {},
		mounted() {},
		methods: {},
	};
</script>
<style lang="scss" scoped></style>
